<table border="1" cellpadding="3" cellspacing="0" width="80%">
    <tr align="center">
        <td colspan="7" height="25">Laporan Petty Cash</td>
    </tr>
    <tr align="center">
        <td>Kode Transaksi</td>
        <td>Tanggal</td>
        <td>Kode Petty Cash</td>
        <td>Nama Petty Cash</td>
        <td>Jumlah Bayar</td>
        <td>Keterangan</td>
        <td>Nama Pembuat</td>
    </tr>
	<?php 
		foreach($dt_petty as $items) 
		{
	?>    
            <tr class="cellDefault">
                <td><?php echo $items->Kdtransaksi ?></td>
                <td><?php echo $items->Tanggal ?></td>
                <td><?php echo $items->Kodepettycash ?></td>
                <td><?php echo $items->namapettycash ?></td>
                <td><?php echo $items->Amount ?></td> 
                <td><?php echo $items->Keterangan ?></td>
                <td><?php echo $items->CreatedBy ?></td> 
            </tr>    
  	<?php } ?>
</table>
<?php
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=exceldata.xls");
header("Pragma: no-cache");
header("Expires: 0");	
?>  